< previous page page_389 next page >

Page 389
If you look at enough Web pages, you'll see that they have several common elements. Every Web page is made of essentially the following lines of HTML code:
<html>
<head>
<title>Demo Home Page</title>
</head>
<body>
</body>
</html>
This is the basic structure of every HTML file that you'll work with, no matter how complex they get. The tags <head>, <body>, and <html> start sections, and those sections are closed with </head>, </body>, and </html>, respectively. Remember, not all HTML tags have to be closed.
Understanding HTML Tags
HTML pages have their instructions or tags enclosed in brackets, as discussed in the preceding section. These tags aren't displayed in the browser window; they serve to tell the browser how to display the text.
Most tags are closed by duplicating the tag instruction with a slash (/) placed at the beginning of the tag name. Every HTML page begins with an <HTML> tag and ends with an </HTML> tag. These two tags tell the browser where the Web page begins and ends. Between these HTML tags, every page has two sectionsthe head and the body. Both sections must be defined for the browser to display the page properly. The head is everything between the <head> and </head> tags, whereas the body is anything between the <body> and </body> tags.
Tip
It doesn't matter whether the tags are uppercase, but consider capitalizing them to make them easier to find when making changes to the Web page later.

In the head section of Figure 14.9, notice that one line is <title>Demo Home Page</title>. The browser will display the words between those title tags on the title bar of the browser window. Although the average visitor won't pay much attention to the title bar while viewing the Web page, text within the title tag is what browsers usually save with a bookmark or as Favorites in Internet Explorer. Other codes can also appear in the head section of an HTML document. For example, you could use a link tag here to define a relationship between the Web page and yourself as the owner or manager of the Web page. Your link could look like this:
<LINK rev=made href=mailto:yourid@youraddress>.

 
< previous page page_389 next page >

If you like this book, buy it!